import Vue from 'vue'
import Router from 'vue-router'
// import Home from './views/Home.vue'

Vue.use(Router)

export default new Router({
	mode: 'hash',
	linkActiveClass: "active",
	routes: [{
			path: "/",
			redirect: '/home',
			component: () => import('./views/Home.vue'),
		},
		// 新增页面：重名
		{
			path: "/search_name",
			name: '/search_name',
			component: () => import('./views/search_name/index.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 经典起名
		{
			path: "/classic_name",
			name: 'classic_name',
			component: () => import('./views/classicName/index.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 经典起名之输入起名信息页面
		{
			path: "/classic_input",
			name: 'classic_input',
			component: () => import('./views/classicInput/index.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 名字含义分析
		{
			path: "/name_analysis",
			name: 'name_analysis',
			component: () => import('./views/nameAnalysis/index.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 高分起名
		{
			path: "/high_input",
			name: 'high_input',
			component:resolve => require(['./views/highInput/index.vue'],resolve),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 高分名字含义分析
		{
			path: "/high_name",
			name: 'high_name',
			component:resolve => require(['./views/highName/index.vue'],resolve),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 五行字典
		{
			path: "/wuXing_input",
			name: 'wuXing_input',
			component:resolve => require(['./views/wuXingInput/index.vue'],resolve),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 五行字典名字含义分析
		{
			path: "/wuxing_name",
			name: 'wuxing_name',
			component:resolve => require(['./views/wuxingName/index.vue'],resolve),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 姓名打分
		{
			path: "/name_grade", 
			name: 'name_grade',
			component:resolve => require(['./views/nameGrade/index.vue'],resolve),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 姓名打分详情
		{
			path: "/grade_detail",
			name: 'grade_detail',
			component:resolve => require(['./views/gradeDetail/index.vue'],resolve),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 生成八字
		{
			path: "/birth_input",
			name: 'birth_input',
			component:resolve => require(['./views/birthInput/index.vue'],resolve),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 生成八字详情
		{
			path: "/birth_detail",
			name: 'birth_detail',
			component:resolve => require(['./views/birthDetail/index.vue'],resolve),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 诗词起名(选择作者)
		{
			path: "/select_author",
			name: 'select_author',
			component:resolve => require(['./views/poetryName/selectAuthor.vue'],resolve),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 诗词起名(选择诗词)
		{
			path: "/select_dynasty",
			name: 'select_dynasty',
			component:resolve => require(['./views/poetryName/selectDynasty.vue'],resolve),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		// 诗词起名(起名详情)
		{
			path: "/select_detail",
			name: 'select_detail',
			component:resolve => require(['./views/poetryName/selectDetail.vue'],resolve),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		{
			path:"/vip_pay",
			name:"vip_pay",
			component:resolve => require(['./views/vipPay/index.vue'],resolve),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		{
			path: "/test",
			component: () => import('./views/Home.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		{
			path: "/home",
			component: () => import('./views/home/index.vue'),
			meta: {
				isHeaderShow: true,
				isTopBannerShow:true,
				isFootShow: true,
			}
		},
		{
			path: '/help', // 帮助中心
			name: 'help',
			component: () => import('./views/help/index.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		{
			path: '/help/detail', // 帮助中心
			name: 'helpDetail',
			component: () => import('./views/help/detail.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		{
			path: '/help/mContent', // 帮助中心移动端
			name: 'mContent',
			component: () => import('./views/help/m-content.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: false,
			}
		},
		{
			path: "/resume",
			component: () => import('./views/resume/index.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		{
			path: "/userresume",
			component: () => import('./views/userresume/index.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			}
		},
		{
			path: "/aboutus",
			component: () => import('./views/aboutus/index.vue'),
			redirect: "/aboutus/contact",
			meta: {
				isHeaderShow: true,
				isFootShow: true,
			},
			children: [{
					path: "index",
					meta: {
						isHeaderShow: true,
						isFootShow: true,
					},
					component: () => import('./views/aboutusIndex/index.vue'),
				},
				{
					path: "contact",
					meta: {
						isHeaderShow: true,
						isFootShow: true,
					},
					component: () => import('./views/contact/index.vue'),
				},
				{
					path: "cooperation",
					meta: {
						isHeaderShow: true,
						isFootShow: true,
					},
					component: () => import('./views/cooperation/index.vue'),
				},
				{
					path: "partner",
					meta: {
						isHeaderShow: true,
						isFootShow: true,
					},
					component: () => import('./views/partner/index.vue'),
				},
				{
					path: "termofservice",
					meta: {
						isHeaderShow: true,
						isFootShow: true,
					},
					component: () => import('./views/termofservice/index.vue'),
				},
				{
					path: "privacy",
					meta: {
						isHeaderShow: true,
						isFootShow: true,
					},
					component: () => import('./views/privacy/index.vue'),
				},
				{
					path: "barrister",
					meta: {
						isHeaderShow: true,
						isFootShow: true,
					},
					component: () => import('./views/barrister/index.vue'),
				},
				{
					path: "rules",
					meta: {
						isHeaderShow: true,
						isFootShow: true,

					},
					component: () => import('./views/rules/index.vue'),
				},
			]
		},
		{
			path: "/message",
			component: () => import('./views/message/index.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: true
			}
		},
		{
			path: "/blankwx", // 空白页面  调取支付宝需要用到的页面 
			component: () => import('./views/blank/index.vue'),
			meta: {
				isHeaderShow: false,
				isFootShow: false
			}
		},
		{
			path: "/blankzfb", // 空白页面  调取支付宝需要用到的页面 
			component: () => import('./views/blankzfb/index.vue'),
			meta: {
				isHeaderShow: false,
				isFootShow: false
			}
		},
		{
			path: "/price",
			component: () => import('./views/price/index.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: true
			}
		},
		{
			path: '/userLogin', // 个人登陆
			name: 'login',
			component: () => import('./views/login/index.vue'),
			meta: {
				isHeaderShow: false,
				isFootShow: false
			}
		},
		{
			path: '/busLogin', // 商家登陆
			name: 'login1',
			component: () => import('./views/login/index.vue'),
			meta: {
				isHeaderShow: false,
				isFootShow: false
			}
		},
		{
			path: '/userregister', // 个人注册 
			name: 'userregister',
			component: () => import('./views/register/index.vue'),
			meta: {
				isHeaderShow: false,
				isFootShow: false
			}
		},
		{
			path: '/weixinregister', // 个人注册 
			name: 'weixinregister',
			component: () => import('./views/weixinregister/index.vue'),
			meta: {
				// requireAuth:true
				isHeaderShow: false,
				isFootShow: false
			}
		},
		{
			path: '/busregister', // 商家注册
			name: 'busregister',
			component: () => import('./views/register/index.vue'),
			meta: {
				isHeaderShow: false,
				isFootShow: false
			}
		},
		{
			path: '/forgetPassword', // 忘记密码
			name: 'forgetPassword',
			component: () => import('./views/forgetPassword/index.vue'),
			meta: {
				isHeaderShow: false,
				isFootShow: false
			}
		},
		{
			path: '/register/step2', // 商家注册 需要上传照片 身份证
			name: 'step2',
			component: () => import('./views/step/index.vue'),
			meta: {
				isHeaderShow: false,
				isFootShow: false
			}
		},
		{
			path: '/qiming', // 商家注册 需要上传照片 身份证
			name: 'qiming',
			redirect: "/qiming/sign",
			component: () => import('./views/qiming/index.vue'),
			meta: {
				isHeaderShow: true,
				isFootShow: true
			},
			children: [{
					path: 'sign', // 起名
					name: 'sign',
					component: () => import('./views/sign/index.vue'),
					meta: {
						isHeaderShow: true,
						isFootShow: true,
					}
				},
				{
					path: 'payment', // 起名之后付款
					name: 'payment',
					component: () => import('./views/payment/index.vue'),
					meta: {
						isHeaderShow: true,
						isFootShow: true
					}
				},
				{
					path: "/holdall",
					component: () => import('./views/holdall/index.vue'),
					meta: {
						isHeaderShow: true,
						isFootShow: true
					}
				},
				{
					path: 'pub', // 起名之后付款
					name: 'pub',
					component: () => import('./views/pub/index.vue'),
					meta: {
						isHeaderShow: true,
						isFootShow: true
					}
				},
			]
		},
		{
			path: '/info', // 后台查看详情
			name: 'info',
			redirect: "/info/qmjl",
			component: () => import('./views/info/index.vue'),
			meta: {
				isHeaderShow: false,
				isFootShow: false
			},
			children: [{
					path: "zhzl",
					meta: {
						requireAuth: true
					},
					component: () => import('./views/zhzl/index.vue'),
				},
				{
					path: "qmjl",
					meta: {
						requireAuth: true
					},
					component: () => import('./views/qmjl/index.vue'),
				},
				{
					path: "fkjl",
					meta: {
						requireAuth: true
					},
					component: () => import('./views/fkjl/index.vue'),
				},
				{
					path: "zlsz",
					meta: {
						requireAuth: true
					},
					component: () => import('./views/zlsz/index.vue'),
					children: [{
						path: "uptPass",
						component: () => import('./views/uptPassword/index.vue'),
					}]
				},
				{
					path: "my",
					meta: {
						requireAuth: true
					},
					component: () => import('./views/my/index.vue'),
				},
				{
					path: "share",
					meta: {
						requireAuth: true
					},
					component: () => import('./views/share/index.vue'),
				},

			]
		},
		{
			path: "/weChatbangd",
			meta: {
				isHeaderShow: false,
				isFootShow: false,
				title: '猪爸爸账号微信绑定'
			},
			component: () => import('./views/weChatbangd/index.vue'),
		},
		{
			path: "/bindingSuccess",
			meta: {
				isHeaderShow: false,
				isFootShow: false,
				title: '猪爸爸账号微信绑定'
			},
			component: () => import('./views/weChatbangd/bindingSuccess.vue'),
		},
		{
			path: "/paySuccess",
			meta: {
				isHeaderShow: true,
				isFootShow: true,
				title: '支付成功'
			},
			component: () => import('./views/weChatbangd/paySuccess.vue'),
		},
	]
})